//
//  SmallDecisionsNavigatorManager.h
//  SmallDecisions
//
//  Created by 李付雄 on 2025/6/14.
//

#import <Foundation/Foundation.h>
#import "SmallDecisionsCommonModalTransition.h"
#import "SmallDecisionsBaseDefine.h"
NS_ASSUME_NONNULL_BEGIN

@interface SmallDecisionsNavigatorManager : NSObject

@property (nonatomic, weak) UINavigationController *mainNavigationController;
@property (nonatomic, weak) UINavigationController *currentNavigationController;

@property (nonatomic, strong, readonly) NSMutableArray *navigationControllerList;
@property (nonatomic, strong, readonly) NSMutableArray *modalDelegateList;

+ (instancetype)shareInstance;

+ (void)insertViewController:(UIViewController *)viewController
                      toIndex:(NSInteger)index
                     animated:(BOOL)animated;
+ (void)redirectViewController:(UIViewController *)viewController
                       toIndex:(NSInteger)index
                      animated:(BOOL)animated;
+ (void)pushViewController:(UIViewController *)viewController;
+ (void)pushViewController:(UIViewController *)viewController
                  animated:(BOOL)animated;
+ (void)pushViewController:(UIViewController *)viewController
                  animated:(BOOL)animated
               finishBlock:(void (^ _Nullable)(void))finishBlock;

+ (void)popViewControllerAnimated:(BOOL)animated;
+ (void)popViewControllerAnimated:(BOOL)animated
                      finishBlock:(void (^ _Nullable)(void))finishBlock;
+ (void)popToViewController:(UIViewController * _Nullable)viewController
                   animated:(BOOL)animated
                finishBlock:(void (^ _Nullable)(void))finishBlock;
+ (void)popToRootViewControllerAnimated:(BOOL)animated;
+ (void)popToRootViewControllerAnimated:(BOOL)animated
                            finishBlock:(void (^ _Nullable)(void))finishBlock;

+ (UINavigationController *)setRootViewController:(UIViewController *)viewController
                                         animated:(BOOL)animated;

+ (void)presentViewController:(UIViewController *)controller
                animationType:(SmallDecisionsAnimationType)animationType;
+ (void)presentViewController:(UIViewController *)controller
                animationType:(SmallDecisionsAnimationType)animationType
                       height:(CGFloat)height;
+ (void)presentViewController:(UIViewController *)controller
            showNavigationBar:(BOOL)showNavigationBar
                animationType:(SmallDecisionsAnimationType)animationType;
+ (void)sysPresentViewController:(UIViewController *)controller;
+ (void)sysPresentViewController:(UIViewController *)controller
        needNavigationController:(BOOL)need;
+ (void)dismissViewControllerAnimated:(BOOL)animated
                           completion:(void (^ __nullable)(void))completion;

+ (void)interactiveDismissViewControllerAnimated:(BOOL)animated
                                      completion:(void (^ __nullable)(void))completion;
+ (void)removeDismissViewController;

@end

NS_ASSUME_NONNULL_END
